/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package visaocomputacional;

import org.jfree.ui.RefineryUtilities;

/**
 *
 * @author Kazoo
 */
public class VisaoComputacional {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        CV i = new CV();
        
        //int[][][]m01 = i.arquivoToMatriz_RGB("files/people.jpg");
        //int[][][]m02 = i.pele1(m01);
        //i.matrizToArquivo_RGB(m02, "files/pele5");
        int[][] m01 = i.arquivoToMatriz("files/equalization.jpg");
        //int[][] m02 = i.histograma_equalizado(i.histograma(m01));
        int[][] m02 = i.equalizar(m01);
        
        //i.binariza(matriz02,150);
        //i.objectCounter(matriz02);

        //Instancia e exibe formulario com duas imagens
        Formulario f = new Formulario();
        f.addImage(i.matrizToImagem(m01));
        f.addImage(i.matrizToImagem(m02));
        f.exibir();
        
        Chart demo = new Chart("Histograma Original",m01);
        demo.pack();
        RefineryUtilities.centerFrameOnScreen(demo);
        demo.setVisible(true);
        
        Chart demo2 = new Chart("Histograma Equalizado",m02);
        demo2.pack();
        RefineryUtilities.centerFrameOnScreen(demo2);
        demo2.setVisible(true);
    }
}
